/**
 * @file monitor.h
 * @author bean (813023818@qq.com)
 * @brief 
 * @version 0.1
 * @date 2023-01-05
 * 
 * @copyright Copyright (c) 2023
 * 
 */
#pragma once
#include "systemc.h"
SC_MODULE(monitor_s)
{
	sc_in<sc_bv<1>> m_uart_txd;
	sc_in<sc_bv<8>> m_q, m_q_output;
	sc_in<bool> m_sys_rst_n, m_start_flag, m_tx_flag, clk;
	void prc_monitor()
	{
		while (1)
		{
			cout << "At time:" << sc_time_stamp();
			cout << "\t m_reset=" << m_sys_rst_n.read() << "\t m_start_flag=" << m_start_flag.read();
			cout << "\t m_q=" << m_q.read() << "\t m_q_output=" << m_q_output.read();
			cout << "\t m_tx_flag = " << m_tx_flag.read() << "\tm_uart_txd = " << m_uart_txd << endl;
			wait();
		}
	}
	SC_CTOR(monitor_s)
	{
		SC_THREAD(prc_monitor);
		sensitive << m_sys_rst_n << m_q << m_tx_flag << m_q_output << m_start_flag << m_uart_txd;
	}
};